package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MstnSchemeComputeMapper;
import com.ruoyi.system.domain.MstnSchemeCompute;
import com.ruoyi.system.service.IMstnSchemeComputeService;

/**
 * 设计方案计算Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-06
 */
@Service
public class MstnSchemeComputeServiceImpl implements IMstnSchemeComputeService 
{
    @Autowired
    private MstnSchemeComputeMapper mstnSchemeComputeMapper;

    /**
     * 查询设计方案计算
     * 
     * @param schemeComputeId 设计方案计算主键
     * @return 设计方案计算
     */
    @Override
    public MstnSchemeCompute selectMstnSchemeComputeBySchemeComputeId(Long schemeComputeId)
    {
        return mstnSchemeComputeMapper.selectMstnSchemeComputeBySchemeComputeId(schemeComputeId);
    }

    /**
     * 查询设计方案计算列表
     * 
     * @param mstnSchemeCompute 设计方案计算
     * @return 设计方案计算
     */
    @Override
    public List<MstnSchemeCompute> selectMstnSchemeComputeList(MstnSchemeCompute mstnSchemeCompute)
    {
        return mstnSchemeComputeMapper.selectMstnSchemeComputeList(mstnSchemeCompute);
    }

    /**
     * 根据批次ID查询设计方案计算列表
     * @param batchId
     * @return
     */
    @Override
    public List<MstnSchemeCompute> selectMstnSchemeComputeListByBatchId(Long batchId){
        return mstnSchemeComputeMapper.selectMstnSchemeComputeListByBatchId(batchId);
    }
    /**
     * 新增设计方案计算
     * 
     * @param mstnSchemeCompute 设计方案计算
     * @return 结果
     */
    @Override
    public int insertMstnSchemeCompute(MstnSchemeCompute mstnSchemeCompute)
    {
        return mstnSchemeComputeMapper.insertMstnSchemeCompute(mstnSchemeCompute);
    }


    /**
     * 批量新增设计方案计算
     * @param mstnSchemeComputes
     * @return
     */
    @Override
    public int insertMstnSchemeComputeList(List<MstnSchemeCompute> mstnSchemeComputes) {
        return mstnSchemeComputeMapper.insertMstnSchemeComputeList(mstnSchemeComputes);
    }
    /**
     * 修改设计方案计算
     * 
     * @param mstnSchemeCompute 设计方案计算
     * @return 结果
     */
    @Override
    public int updateMstnSchemeCompute(MstnSchemeCompute mstnSchemeCompute)
    {
        return mstnSchemeComputeMapper.updateMstnSchemeCompute(mstnSchemeCompute);
    }

    /**
     * 批量删除设计方案计算
     * 
     * @param schemeComputeIds 需要删除的设计方案计算主键
     * @return 结果
     */
    @Override
    public int deleteMstnSchemeComputeBySchemeComputeIds(Long[] schemeComputeIds)
    {
        return mstnSchemeComputeMapper.deleteMstnSchemeComputeBySchemeComputeIds(schemeComputeIds);
    }

    /**
     * 删除设计方案计算信息
     * 
     * @param schemeComputeId 设计方案计算主键
     * @return 结果
     */
    @Override
    public int deleteMstnSchemeComputeBySchemeComputeId(Long schemeComputeId)
    {
        return mstnSchemeComputeMapper.deleteMstnSchemeComputeBySchemeComputeId(schemeComputeId);
    }

    /**
     * 重置计算信息
     * @param schemeComputeId
     * @return
     */
    @Override
    public int restWithComputeId(Long schemeComputeId){
        return mstnSchemeComputeMapper.restWithComputeId(schemeComputeId);
    }
}
